#include "gdal/include/gdal_priv.h"
#include "gdal/include/ogrsf_frmts.h"
#pragma comment(lib,"gdal/gdal_i.lib")
#include "pch.h"
#include <vector>
#include <math.h>
using namespace std;
#pragma once

class RasterIO
{
public:
	GDALDataset * pRDatasetR;
	GDALDataset * pRDatasetW;
	GDALDriver * pRDriverW;
	double * pRDataR;
	CString strDriver;
	int iHeight;
	int iWidth;
	int iBandNum;
	CString strProjection;
	double dGeoTransform[6];
	GDALRasterBand * poBand;
	char** papszMetadata;
public:
	BOOL OpenRaster(CString FileName);
	BOOL CreateRaster(CString FileName,int iHeight,int iWidth,int iBandNum);
	BOOL CloseRaster(GDALDataset * Dataset);
	BOOL ReadRaster(int iBand);
	BOOL WriteRaster(int iBand, double *pdata, int iHeight, int iWidth);
};
